package bit.action;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import bit.dao.BoardDAO;
import bit.dao.BoardDTO;

public class BoardUpdateFormAction implements Action {

	@Override
	public ActionForward execute(HttpServletRequest req, HttpServletResponse res)
			throws ServletException, IOException {
		String num = req.getParameter("num");
		BoardDAO dao = new BoardDAO();
		BoardDTO dto = dao.boardDetail(num);
		req.setAttribute("dto", dto);
		
		ActionForward forward = new ActionForward();
		forward.setPath("board/boardUpdateForm.jsp");
		forward.setRedirect(false);
		
		return forward;
	}

}
